package com.abbas.smartCity.retroft;

import android.util.Log;

import androidx.annotation.Nullable;

import com.abbas.smartCity.bean.BaseBean;
import com.abbas.smartCity.bean.NetBean;
import com.abbas.smartCity.bean.ServerDTO;
import com.abbas.smartCity.bean.commonweal.CommonwealActivityType;
import com.abbas.smartCity.bean.commonweal.CommonwealBanner;
import com.abbas.smartCity.bean.commonweal.CommonwealRecommendList;
import com.abbas.smartCity.bean.findJob.Company;
import com.abbas.smartCity.bean.findJob.JobList;
import com.abbas.smartCity.bean.findJob.PostHistoryList;
import com.abbas.smartCity.bean.findJob.QueryResume;
import com.abbas.smartCity.bean.gov.GovAppealBean;
import com.abbas.smartCity.bean.gov.GovAppealCategoryTypeBean;
import com.abbas.smartCity.bean.gov.GovAppealListBean;
import com.abbas.smartCity.bean.gov.GovHomeBannerBean;
import com.abbas.smartCity.bean.HomeBannerBean;
import com.abbas.smartCity.bean.HomeNewsBean;
import com.abbas.smartCity.bean.HomeNewsDetailBean;
import com.abbas.smartCity.bean.HomeNewsTypeBean;
import com.abbas.smartCity.bean.inn.InnDetailBean;
import com.abbas.smartCity.bean.inn.InnListBean;
import com.abbas.smartCity.bean.LoginBean;
import com.abbas.smartCity.bean.ResponseBean;
import com.abbas.smartCity.bean.ServerBean;
import com.abbas.smartCity.bean.inn.TalentPolicyAreaDetailBean;
import com.abbas.smartCity.bean.inn.TalentPolicyAreaListBean;
import com.abbas.smartCity.bean.inn.TalentPolicyDetailBean;
import com.abbas.smartCity.bean.inn.TalentPolicyListBean;
import com.abbas.smartCity.bean.UploadBean;
import com.abbas.smartCity.bean.UserInfoBean;
import com.abbas.smartCity.bean.lawyer_onsultation.Comment;
import com.abbas.smartCity.bean.lawyer_onsultation.Consultation;
import com.abbas.smartCity.bean.lawyer_onsultation.Lawyer;
import com.abbas.smartCity.bean.lawyer_onsultation.LawyerBanner;
import com.abbas.smartCity.bean.lawyer_onsultation.LawyerList;
import com.abbas.smartCity.bean.lawyer_onsultation.LawyerTop;
import com.abbas.smartCity.bean.lawyer_onsultation.LegalExpertiseList;
import com.abbas.smartCity.bean.logistics_inquiries.LogisticsBanner;
import com.abbas.smartCity.bean.logistics_inquiries.LogisticsCompany;
import com.abbas.smartCity.bean.logistics_inquiries.LogisticsCompanyDetail;
import com.abbas.smartCity.bean.movie.MovieList;
import com.abbas.smartCity.bean.parkingWhereBean.CarList;
import com.abbas.smartCity.bean.parkingWhereBean.ParkingAdvList;
import com.abbas.smartCity.bean.parkingWhereBean.ParkingDetail;
import com.abbas.smartCity.bean.parkingWhereBean.ParkingHistoryList;
import com.abbas.smartCity.bean.parkingWhereBean.ParkingList;
import com.abbas.smartCity.bean.petHos.InquiryMessageList;
import com.abbas.smartCity.bean.petHos.PetDoc;
import com.abbas.smartCity.bean.petHos.PetType;
import com.abbas.smartCity.bean.petHos.PubInquiryList;
import com.abbas.smartCity.bean.volunteering.VolunteeringList;
import com.abbas.smartCity.bean.volunteering.VolunteeringNews;
import com.abbas.smartCity.bean.volunteering.VolunteertingBanner;
import com.abbas.smartCity.bean.waste_sorting.GarbageBannerBean;
import com.abbas.smartCity.bean.waste_sorting.HotKeyWord;
import com.abbas.smartCity.bean.waste_sorting.News;
import com.abbas.smartCity.bean.waste_sorting.NewsDetails;
import com.abbas.smartCity.bean.waste_sorting.NewsType;
import com.abbas.smartCity.bean.waste_sorting.PostIm;
import com.abbas.smartCity.bean.waste_sorting.Sort;

import okhttp3.MultipartBody;
import okhttp3.RequestBody;
import retrofit2.Call;
import retrofit2.http.Body;
import retrofit2.http.GET;
import retrofit2.http.Multipart;
import retrofit2.http.POST;
import retrofit2.http.PUT;
import retrofit2.http.Part;
import retrofit2.http.Path;
import retrofit2.http.Query;

/**
 * Retrofit 需要的接口列表
 */
public interface Api {

    //Call<ResponseBody> 固定写法(没有转换器的话
    @POST("/prod-api/api/login")
    Call<LoginBean> login(@Body RequestBody requestBody);

//    @POST("/prod-api/api/login")
//    Call<NetBean<LoginBean>> login2(@Body RequestBody requestBody);

    @GET("/prod-api/api/rotation/list")
    Call<HomeBannerBean> getHomeBanner();

    @GET("/prod-api/api/service/list")
    Call<ServerBean> getServer();

    @GET("/prod-api/api/service/list")
    Call<NetBean<ServerDTO>> getServer2();

//    @GET("/prod-api/api/service/list")
//    Call<ServerDTO> getServer3();

    @GET("/prod-api/press/category/list")
    Call<HomeNewsTypeBean> getNewsType();

    @GET("/prod-api/press/press/list")
    Call<HomeNewsBean> getHomeNews(@Nullable @Query("type") Integer typeId,@Nullable @Query("title") String title);

    @GET("/prod-api/press/press/{id}")
    Call<HomeNewsDetailBean> getHomeNewsDetail(@Path("id") Integer newsId);

    @GET("/prod-api/api/common/user/getInfo")
    Call<UserInfoBean> getUserInfo();

    @PUT("/prod-api/api/common/user")
    Call<ResponseBean> changeUserInfo(@Body RequestBody requestBody);

    @Multipart
    @POST("/prod-api/common/upload")
    Call<UploadBean> postFile(@Part MultipartBody.Part part);

    @PUT
    Call<ResponseBean> changePassword(@Body RequestBody body);

    @POST
    Call<ResponseBean> postAdvise(@Body RequestBody body);


    //******************************
    @GET("/prod-api/api/youth-inn/talent-policy-area/list")
    Call<TalentPolicyAreaListBean> getTalentPolicyAreaList();

    @GET("/prod-api/api/youth-inn/youth-inn/list")
    Call<InnListBean> getInnList();

    @GET("/prod-api/api/youth-inn/youth-inn/{id}")
    Call<InnDetailBean> getInnDetail(@Path("id")Integer id);

    @GET("/prod-api/api/youth-inn/talent-policy-area/{id}")
    Call<TalentPolicyAreaDetailBean> getTalentPolicyAreaDetail(@Path("id")Integer id);

    @GET("/prod-api/api/youth-inn/talent-policy/list")
    Call<TalentPolicyListBean> getTalentPolicyList(@Query("areaId")Integer areaId);

    @GET("/prod-api/api/youth-inn/talent-policy/{id}")
    Call<TalentPolicyDetailBean> getTalentPolicyDetail(@Path("id")Integer id);


    //****************************政府服务热线****************************
    @GET("/prod-api/api/gov-service-hotline/ad-banner/list")
    Call<GovHomeBannerBean> getGovHomeBanner();

    @GET("/prod-api/api/gov-service-hotline/appeal-category/list")
    Call<GovAppealCategoryTypeBean> getAppealCategory();

    @GET("/prod-api/api/gov-service-hotline/appeal/list")
    Call<GovAppealListBean> getAppealOfCategory(@Query("appealCategoryId")Integer appealCategoryId);

    @GET("/prod-api/api/gov-service-hotline/appeal/{id}")
    Call<GovAppealBean> getAppealDetailOfId(@Path("id")Integer id);



    @GET("/prod-api/api/park/lot/list")
    Call<ParkingList> getParkingList(@Query("parkName") String parkName);

    @GET("/prod-api/api/park/lot/{id}")
    Call<ParkingDetail> getParkingDetail(@Path("id")Integer id);

    @GET("/prod-api/api/park/lot/record/list")
    Call<ParkingHistoryList> getParkingHistoryList(@Query("entryTime")String entryTime, @Query("outTime")String outTime,
                                                   @Query("pageNum")Integer pageNum, @Query("pageSize")Integer pageSize);

    @GET("/prod-api/api/park/car/my")
    Call<CarList> getMyCar();

    @POST("/prod-api/api/park/car")
    Call<BaseBean> postMyCar(@Body RequestBody body);

    @POST("/prod-api/api/park/feedback")
    Call<BaseBean> postParkingAvd(@Body RequestBody body);

    @GET("/prod-api/api/park/feedback/list")
    Call<ParkingAdvList> getParkingAdvList();

    @GET("/prod-api/api/movie/film/list")
    Call<MovieList> getMovieList(@Query("name")String name, @Query("pageNum")Integer pageNum, @Query("pageSize")Integer pageSize);


    @GET("/prod-api/api/job/post/list")
    Call<JobList> getJobList(@Query("professionId")Integer professionId);

    @GET("/prod-api/api/job/deliver/list")
    Call<PostHistoryList> getHistoryPost(@Query("pageNum")Integer pageNum, @Query("pageSize")Integer pageSize);

    @POST("/prod-api/api/job/resume")
    Call<BaseBean> postJobResume(@Body RequestBody body);

    @PUT("/prod-api/api/job/resume")
    Call<BaseBean> changeJobResume(@Body RequestBody body);

    @GET("/prod-api/api/job/resume/queryResumeByUserId/{userId}")
    Call<QueryResume> getResume(@Path("userId")Integer userId);

    @GET("/prod-api/api/job/company/{id}")
    Call<Company> getCompany(@Path("id")Integer id);

    @POST("/prod-api/api/job/deliver")
    Call<BaseBean> postResume(@Body RequestBody body);



    //公益爱心
    //广告轮播图
    @GET("/prod-api/api/public-welfare/ad-banner/list")
    Call<CommonwealBanner> getWelfareBannerList();

    //活动分类
    @GET("/prod-api/api/public-welfare/public-welfare-type/list")
    Call<CommonwealActivityType> getWelfareActivityType();

    //活动推荐列表
    @GET("/prod-api/api/public-welfare/public-welfare-activity/recommend-list")
    Call<CommonwealRecommendList> getWelfareRecommendList();

    //根据公益分类获取公益列表
    @GET("/prod-api/api/public-welfare/public-welfare-activity/list")
    Call<CommonwealRecommendList> getWelfareListOfType(@Query("typeId") int typeId);

    //根据名称查询公益列表
    @GET("/prod-api/api/public-welfare/public-welfare-activity/list")
    Call<CommonwealRecommendList> getWelfareListOfName(@Query("name") String name);

    //查询公益列表
    @GET("/prod-api/api/public-welfare/public-welfare-activity/list")
    Call<CommonwealRecommendList> getWelfareList(@Query("pageSize") int pageSize, @Query("pageNum") int pageNum);

    //公益捐赠
    @POST("/prod-api/api/public-welfare/donate-record")
    Call<BaseBean> commonwealDonateFor(@Body RequestBody requestBody);


    @GET("/prod-api/api/garbage-classification/ad-banner/list")
    Call<GarbageBannerBean> getGarbageBannerData();

    //查询垃圾分类新闻分类数据
    @GET("/prod-api/api/garbage-classification/news-type/list")
    Call<NewsType> getGarbageNewsType();

    //查询垃圾分类模块下分类新闻
    @GET("/prod-api/api/garbage-classification/news/list")
    Call<News> getGarbageNewsOfType(@Query("type") int type);

    //查询垃圾分类新闻
    @GET("/prod-api/api/garbage-classification/news/list")
    Call<News> getGarbageNews();

    //获取垃圾分类模块新闻详情
    @GET("/prod-api/api/garbage-classification/news/{id}")
    Call<NewsDetails> getGarbageNewsDetail(@Path("id") int id);

    //垃圾分类模块下发表新闻评论
    @POST("/prod-api/api/garbage-classification/news-comment")
    Call<BaseBean> sendGarbageNewsCommend(@Body RequestBody body);

    //垃圾分类模块下宣传海报
    @GET("/prod-api/api/garbage-classification/poster/list")
    Call<PostIm> getGarbagePoster();

    //垃圾分类模块下垃圾分类热词
    @GET("/prod-api/api/garbage-classification/garbage-classification/hot/list")
    Call<HotKeyWord> getGarbageHotKeyWord();

    //垃圾分类模块下垃圾分类列表
    @GET("/prod-api/api/garbage-classification/garbage-classification/list")
    Call<Sort> getGarbageSort(@Query("name") String name);



    //宠物医院模块下获取宠物分类
    @GET("/prod-api/api/pet-hospital/pet-type/list")
    Call<PetType> getPetType();

    //宠物医院模块下获取自己的宠物问诊历史列表 TODO
    @GET("/prod-api/api/pet-hospital/inquiry/my-list")
    Call<PubInquiryList> getMyPetInguiryHistory(@Query("pageSize") int pageSize, @Query("pageNum") int pageNum);

    //宠物医院下获取所有公开的问诊列表
    @GET("/prod-api/api/pet-hospital/inquiry/list")
    Call<PubInquiryList> getAllPubInquiryList(@Query("pageSize") int pageSize, @Query("pageNum") int pageNum);

    //宠物医院下获取医生列表
    @GET("/prod-api/api/pet-hospital/pet-doctor/list")
    Call<PetDoc> getDoctorList(@Query("pageSize") int pageSize, @Query("pageNum") int pageNum);

    //宠物医院下提交问诊问题
    @POST("/prod-api/api/pet-hospital/inquiry")
    Call<BaseBean> postInquiryQuery(@Body RequestBody body);

    //查询问诊聊天记录
    @GET("/prod-api/api/pet-hospital/inquiry-message/list")
    Call<InquiryMessageList> getInquiryMessageList(@Query("inquiryId") int inquiryId);

    //追问聊天
    @POST("/prod-api/api/pet-hospital/inquiry-message")
    Call<BaseBean> postInquiryMessage(@Body RequestBody body);



    //法律咨询下轮播图
    @GET("/prod-api/api/lawyer-consultation/ad-banner/list")
    Call<LawyerBanner> getLawyerMainBanner();

    //法律咨询下搜索律师、获取分类下律师、根据法律专长查询律师
    @GET("/prod-api/api/lawyer-consultation/lawyer/list")
    Call<LawyerList> getLawyerList(@Query("pageSize") Integer pageSize, @Query("pageNum") Integer pageNum, @Query("legalExpertiseId") Integer legalExpertiseId, @Query("name") String name, @Query("sort") String sort);

    //获取律师评价
    @GET("/prod-api/api/lawyer-consultation/lawyer/list-evaluate")
    Call<Comment> getLawyerComment(@Query("lawyerId")int lawyerId);

    //获取前10律师
    @GET("/prod-api/api/lawyer-consultation/lawyer/list-top10")
    Call<LawyerTop> getTopLawyer(@Query("pageSize") Integer pageSize, @Query("pageNum") Integer pageNum);

    //获取专长列表
    @GET("/prod-api/api/lawyer-consultation/legal-expertise/list")
    Call<LegalExpertiseList> getLegalExpertiseList();

    //提交法律咨询
    @POST("/prod-api/api/lawyer-consultation/legal-advice")
    Call<BaseBean> postConsultation(@Body RequestBody body);

    //获取用户的法律咨询
    @GET("/prod-api/api/lawyer-consultation/legal-advice/list")
    Call<Consultation> getMyConsultation(@Query("pageSize") Integer pageSize, @Query("pageNum") Integer pageNum);

    //获取律师信息
    @GET("/prod-api/api/lawyer-consultation/lawyer/{id}")
    Call<Lawyer> getLawyer(@Path("id")int id);

    //对某条已完成的咨询进行评价
    @POST("/prod-api/api/lawyer-consultation/legal-advice/evaluate")
    Call<BaseBean> postLawyerEvaluate(@Body RequestBody requestBody);





    //志愿活动下轮播图
    @GET("/prod-api/api/volunteer-service/ad-banner/list")
    Call<VolunteertingBanner> getVolunteeringMainBanner();

    //志愿活动下新闻列表 total:12
    @GET("/prod-api/api/volunteer-service/news/list")
    Call<VolunteeringNews> getVolunteeringNews(@Query("pageSize") Integer pageSize, @Query("pageNum") Integer pageNum);

    //志愿活动下获取获取活动列表 total:50
    @GET("/prod-api/api/volunteer-service/activity/list")
    Call<VolunteeringList> getVolunteeringList(@Query("pageSize") Integer pageSize, @Query("pageNum") Integer pageNum);

    //志愿活动下获取活动详细信息
    @GET("/prod-api/api/volunteer-service/activity/{id}")
    Call<VolunteeringList> getVolunteeringDetail(@Path("id")int activityId);

    //志愿活动下报名活动或取消报名
    @POST("/prod-api/api/volunteer-service/register")
    Call<BaseBean> postVolunteeringActivity(@Body RequestBody body);

    //志愿活动下获取用户的所有活动 已报名0 已完成1 已取消2
    @GET("/prod-api/api/volunteer-service/activity/my-list/{state}")
    Call<?> getUserVolunteeringActivity(@Path("state")int state);




    //物流查询下轮播图
    @GET("/prod-api/api/logistics-inquiry/ad-banner/list")
    Call<LogisticsBanner> getLogisticsBannerData();

    //物流查询下所有物流公司
    @GET("/prod-api/api/logistics-inquiry/logistics_company/list")
    Call<LogisticsCompany> getLogisticsCompany();

    //查询物流公司详情
    @GET("/prod-api/api/logistics-inquiry/logistics_company/{id}")
    Call<LogisticsCompanyDetail> getLogisticsCompanyDetail(@Path("id")int id);

    //根据快递单号查询快递数据
    @GET("/prod-api/api/logistics-inquiry/logistics_info/{no}")
    Call<?> getLogisticsPackageInfo(@Path("no") String no);











}
